#!/usr/bin/node

const log = console.log,
      fs = require('fs');

let filename = process.argv[2];
if(filename==null){
  filename=process.argv[1];
}
try{
  let fid = fs.openSync(filename,'r'),
      size = fs.statSync(filename).size,
      buf = new Buffer(size);
  fs.readSync(fid,buf,0,size,0);
  
  log(buf.toString('utf8'));
  fs.closeSync(fid);
}catch(e){
  log(e.message);
}
